package com.iplant.ams.service.basicenum.dms;


import com.iplant.base.po.enums.BaseEnum;

/**
 * 保养等级
 *
 * @author YouWang·Peng
 * 2024-1-23 09:28:20
 */
public enum DMSMaintenanceLevel implements BaseEnum {
    /**
     * 默认
     */
    Default(0, "默认"),
    /**
     * 日常保养
     */
    Daily(1, "日常保养"),
    /**
     * 一级保养
     */
    OneLevel(2, "一级保养"),
    /**
     * 二级保养
     */
    TwoLevel(3, "二级保养");

    private int value;
    private String label;
    private String remark = "";

    DMSMaintenanceLevel(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public static DMSMaintenanceLevel getEnumType(int val) {
        for (DMSMaintenanceLevel type : DMSMaintenanceLevel.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public static DMSMaintenanceLevel getEnumType(String val) {
        for (DMSMaintenanceLevel type : DMSMaintenanceLevel.values()) {
            if (type.getLabel().equals(val)) {
                return type;
            }
        }
        return Default;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
